﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Ext.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="MVCnExt.Views.Grid.List" %>

<%@ Register Assembly="MVCnExt.Web.UI.Ext" Namespace="MVCnExt.Web.UI.Ext" TagPrefix="mvc" %>
<asp:Content ID="aboutContent" ContentPlaceHolderID="MainContent" runat="server">
    <mvc:ExtGridPanel ID="ExtGridPanel1" renderTo="ExtGridPanel1" runat="server" stripeRows="true"
        autoFill="true" loadMask="true" Height="225" Width="600" clicksToEdit="1" trackMouseOver="true">
        <store>            
            <sortInfo field="OrderDate" direction="ASC" />
            <proxy>
                <mvc:ExtHttpProxy url="/tree/list" />
            </proxy>
            <reader>
                <mvc:ExtJsonReader ID="OrderId" root="orders">                    
                    <fields>
                        <mvc:ExtRecord name="OrderId" />
                        <mvc:ExtRecord name="OrderDate" type="Date" dateFormat="n/j/Y" />
                        <mvc:ExtRecord name="ShipAddress" />
                        <mvc:ExtRecord name="ShipCity" />
                        <mvc:ExtRecord name="ShipCountry" />
                        <mvc:ExtRecord name="ShipName" />
                        <mvc:ExtRecord name="ShippedDate" type="Date" dateFormat="n/j/Y" />
                        <mvc:ExtRecord name="ShipCompanyName" />
                        <mvc:ExtRecord name="ShipPostalCode" />
                    </fields>
                </mvc:ExtJsonReader>
            </reader>
        </store>
        <cm>
            <mvc:ExtColumn header="Order Id" dataIndex="OrderId" />
            <mvc:ExtColumn header="Order Date" dataIndex="OrderDate" />
            <mvc:ExtColumn header="Ship Date" dataIndex="ShippedDate" />
            <mvc:ExtColumn header="Shipped Via" dataIndex="ShipCompanyName" />
        </cm>
        <selModel>
            <mvc:ExtRowSelectionModel singleSelect="true" />
        </selModel>
    </mvc:ExtGridPanel>
</asp:Content>
